package com.parsechina.hpush.broker.internal.message;

import java.io.Serializable;

/**
 * @author linfeng
 * @since 2016/12/9
 */
public class NotifyAbstractMessage implements Serializable {

    private static final long serialVersionUID = 709712918812003625L;
    private String uuid;
    private final NotifyType type;

    NotifyAbstractMessage(NotifyType type) {
        this.type = type;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUuid() {
        return uuid;
    }

    public enum NotifyType {
        NOWLEDGE, CONNECTION, CONNECT, DISCONNECT, PUBLISH, SUBSCRIBE, UNSUBSCRIBE, PUBCOMP
    }

    public NotifyType getType() {
        return type;
    }

    @Override
    public String toString() {
        return "NotifyAbstractMessage{" +
                "uuid='" + uuid + '\'' +
                ", type=" + type +
                '}';
    }
}
